x86/iommu: account for necessary allocations when calculating Dom0's initial allocati...
authorKeir Fraser <keir@xen.org>
Tue, 14 Dec 2010 09:54:10 +0000 (09:54 +0000)
committerKeir Fraser <keir@xen.org>
Tue, 14 Dec 2010 09:54:10 +0000 (09:54 +0000)
commit467a09d50d6768c8637e532a960f940fb9df2233
tree5e0d1d21f9b7ac6751dd1b922e6988e1bc2b1756
parentae33959c12092e3b9cc6a72a79722b942ad725f6
x86/iommu: account for necessary allocations when calculating Dom0's initial allocation size

As of c/s 21812:e382656e4dcc, IOMMU related allocations for Dom0
happen only after it got all of its memory allocated, and hence the
reserve (mainly for setting up its swiotlb) may get exhausted without
accounting for the necessary allocations up front.

While not precise, the estimate has been found to be within a couple
of pages for the systems it got tested on.

For the calculation to be reasonably correct, this depends on the
patch titled "x86/iommu: don't map RAM holes above 4G" sent out
yesterday.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/domain_build.c